// 注意：这是一个vuex@3 的 module 对象，只能应用在Vue2项目中

const state = {
  attrItem: {
    attrName: "",
    attrValueList: [],
    categoryId: 0,
    categoryLevel: 3,
  },
};
const mutations = {
  UPDATE_ATTRITEM(state, newVal) {
    state.attrItem = newVal;
  },
  RESET_ATTRITEM(state) {
    state.attrItem = {
      attrName: "",
      attrValueList: [],
      categoryId: 0,
      categoryLevel: 3,
    };
  },
};
const actions = {};
const getters = {};

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters,
};
